package com.itheima.controller;

import com.itheima.common.Result;
import com.itheima.service.SetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/setmeal")
public class SetmealController {
@Autowired
private SetmealService setmealService;
//查询所有套餐
    @GetMapping("/getAllSetmeal.do")
    public Result getAllSetmeal(){
      return   setmealService.getAllSetmeal();
    }
    //根据id查询套餐对应信息
    @PostMapping("/findById.do")
    public Result findById(Integer id){
return setmealService.findById(id);
    }

}
